package com.jt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Size;

@Data
@TableName("POINT_SCADA_CONFIG")
public class PointScadaConfig {

    private static final long serialVersionUID = 1L;
    @TableId(
            value = "ID",
            type = IdType.ASSIGN_UUID
    )
    protected String id;

    /*设备位号*/
    @TableField(value = "DEVICE_CODE")
    private String deviceCode;

    /*设备名称*/
    @TableField(value = "DEVICE_NAME")
    private String deviceName;

    /*安装位置*/
    @TableField(value = "AREA_ID")
    private String areaId;

    /*站场阀室*/
    @TableField(value = "STATION_ID")
    private String stationId;

    /*所属管线*/
    @TableField(value = "LINE_ID")
    private String lineId;

    /*备注*/
    @TableField(value = "REMARK")
    private String remark;

    /*报警选项*/
    @TableField(value = "VALUE_CHECK")
    private String valueCheck;

    /*是否使用*/
    @TableField(value = "USED")
    private String used;

    /*报警通知专业*/
    @TableField(value = "ALARM_NOTIFY_MAJOR")
    private String alarmNotifyMajor;

    /*报警等级*/
    @TableField(value = "ALARM_LEVEL")
    private String alarmLevel;

    /*低低*/
    @TableField(value = "LL")
    private String ll;

    /*低*/
    @TableField(value = "L")
    private String l;

    /*高*/
    @TableField(value = "H")
    private String h;

    /*高高*/
    @TableField(value = "HH")
    private String hh;

    /*点位数据类型*/
    @TableField(value = "POINT_DATA_TYPE")
    private String pointDataType;

    /*监测点位分类*/
    @TableField(value = "POINT_CLASS_ID")
    private String pointClassId;

    /*SCADA位号*/
    @TableField(value = "SCADA_POINT_CODE")
    private String scadaPointCode;

    /*检测点位名称*/
    @TableField(value = "POINT_NAME")
    private String pointName;


    /*设备id*/
    @TableField(value = "DEVICE_ID")
    private String deviceId;


    /*专业id*/
    @TableField(value = "MAJOR_ID")
    private String majorId;


    /*单位*/
    @TableField(value = "UNIT")
    private String unit;

    /*模型位号*/
    @TableField(value = "MODEL_POINT")
    private String modelPoint;


    /*是否报警点位*/
    @TableField(value = "IS_ALARM")

    private String isAlarm;


    /*是否默认展示*/
    @TableField(value = "IS_SHOW")
    private String isShow;

    @TableField(exist = false)
    private String threshold;

    public void buildThreshold() {
        this.threshold = "(" + this.hh + "," + this.h + "," + this.l + "," + this.ll + ")";
    }


}
